package com.weidey.blogWeb.domain.param;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;


@Data
public class UserArticleParam {

  @NotNull(message =  "用户id不能为空")
  @Min(value = 1, message = "用户id不能小于1")
  @Max(value = 100000000, message = "用户id不能大于100000000")
  public int  userId;

  @NotBlank(message =  "文章类型不能为空")
  @Length(min = 1, max = 10, message = "文章类型长度为1-10")
  public String type;

  @NotNull(message =  "页码不能为空")
  public int pageNum;

  @NotNull(message =  "每页条数不能为空")
  @Min(value = 1, message = "每页条数不能小于1")
  @Max(value = 9, message = "每页条数不能大于9")
  public int pageSize;

}
